package com.hjxr.quota.define.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * <p>
 * 预指标公式存储表
 * </p>
 *
 * @author ma
 * @since 2020-10-20
 */
@Data
@TableName("QUOTA_FORMULA")
@KeySequence(value = "seq_quota_formula", clazz = Integer.class)
@ApiModel(value = "QuotaFormula对象", description = "预指标公式存储表")
public class QuotaFormula extends Model<QuotaFormula> {


    @ApiModelProperty(value = "主键ID，自增长ID")
    @TableId(value = "id", type = IdType.INPUT)
    private Integer id;

    @ApiModelProperty(value = "公式所属预指标")
    @TableField("QUOTA_ID")
    private Integer quotaId;

    @ApiModelProperty(value = "公式元素内容")
    @TableField("FORMULA_TEXT_ID")
    private Integer formulaTextId;

    @ApiModelProperty(value = "公式元素类型：0是预指标ID，1是运算符ID")
    @TableField("FORMULA_TYPE")
    private String formulaType;

    @ApiModelProperty(value = "公式元素顺序")
    @TableField("ORDER_NUM")
    private Integer orderNum;

    @ApiModelProperty(value = "指标值sum值")
    @TableField("FORMULA_VALUE")
    private Float formulaValue;

    @TableField(exist = false)
    private List<QuotaFormula> rootIds;
    @TableField(exist = false)
    private String quotaName;
    @TableField(exist = false)
    private String formula;


}
